package top.raoqq.sky.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import top.raoqq.sky.entity.sql.User;

import java.util.List;
import java.util.Set;

/**
 * @author 饶奇奇
 * @date 2023/8/7
 */
public interface UserMapper extends BaseMapper<User> {

    Set<String> getRolesByUsername(@Param("username") String username);

    void bindRole(@Param("userId") Long userId, @Param("roleIdList") List<Long> roleIdList);

    void unBindRole(@Param("userId") Long id);
}
